import { defHttp } from '/@/utils/http/axios'
import { ErrorMessageMode } from '/#/axios'

enum Api {
  Province = '/api/website/common/area/province',
  City = '/api/website/common/area/city',
  Region = '/api/website/common/area/region',
  GetBlurb = '/api/website/common/product/blurb/get',
  GetManual = '/api/website/common/product/manual/get',
  Article = '/api/website/common/article',
  Status = '/api/website/common/website/status',
  Upload = '/api/website/resource/upload',
  DelResource = '/api/website/resource/delete',
}

//获取省份
export function province() {
  return defHttp.get({ url: Api.Province,})
}
//获取城市
export function city(params: any) {
  return defHttp.get({ url: Api.City, params })
}
//获取区县
export function region(params: any) {
  return defHttp.get({ url: Api.Region, params })
}
//获取产品简介
export function getBlurb(params: any) {
  return defHttp.get({ url: Api.GetBlurb, params })
}
//获取操作指南
export function getManual(params: any) {
  return defHttp.get({ url: Api.GetManual, params })
}
//获取合作须知
export function article(params: any) {
  return defHttp.get({ url: Api.Article, params })
}
//获取网站状态
export function getWebStatus() {
  return defHttp.get({ url: Api.Status })
}
// 上传文件
export function uploadApi(params: any) {
  return defHttp.post({ url: Api.Upload, params  })
}
//删除文件
export function delResource(params: any) {
  return defHttp.get({ url: Api.DelResource, params  })
}
